home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kopete / webcamwidget.h < prev   
Encoding:
C/C++ Source or Header  |  2006-10-01  |  1.8 KB  |  67 lines

  1. /*
  2.     webcamwidget.h - A simple widget for displaying webcam frames
  3.  
  4.     Copyright (c) 2006 by Gustavo Pichorim Boiko   <gustavo.boiko@kdemail.net>
  5.     Kopete    (c) 2002-2006 by the Kopete developers  <kopete-devel@kde.org>
  6.  
  7.     *************************************************************************
  8.     *                                                                       *
  9.     * This program is free software; you can redistribute it and/or modify  *
  10.     * it under the terms of the GNU General Public License as published by  *
  11.     * the Free Software Foundation; either version 2 of the License, or     *
  12.     * (at your option) any later version.                                   *
  13.     *                                                                       *
  14.     *************************************************************************
  15. */
  16.  
  17. #ifndef WEBCAMWIDGET_H 
  18. #define WEBCAMWIDGET_H 
  19.  
  20. #include <qwidget.h>
  21. #include <qpixmap.h>
  22. #include <qstring.h>
  23.  
  24. #include "kopete_export.h"
  25.  
  26. namespace Kopete
  27. {
  28. /**
  29.  * A simple widget to display webcam frames.
  30.  */
  31. class KOPETE_EXPORT WebcamWidget : public QWidget
  32. {
  33. Q_OBJECT
  34. public:
  35.     /**
  36.     * @brief WebcamWidget constructor.
  37.     * @param parent The parent widget of this widget
  38.     * @param name The name for this QObject
  39.     */
  40.     WebcamWidget( QWidget* parent = 0, const char* name = 0 );
  41.     ~WebcamWidget();
  42.  
  43.     /**
  44.      * @brief Updates the frame being displayed in the widget
  45.      * @param pixmap The frame to be displayed
  46.      */
  47.     void updatePixmap(const QPixmap& pixmap);
  48.  
  49.     /**
  50.      * @brief Clear the widget
  51.      */
  52.     void clear();
  53.  
  54.     /**
  55.      * @brief Set a text to be displayed in the widget
  56.      * @param text The text to be displayed
  57.      */
  58.     void setText(const QString& text);
  59. protected slots:
  60.     void paintEvent( QPaintEvent* event );
  61.     QPixmap mPixmap;
  62.     QString mText;
  63. };
  64.  
  65. } // end namespace Kopete
  66. #endif
  67.